// dialogscript for town 28: Filberton

begintalkscript;

variables;

int day1,day2;

// *** The secretary ***

begintalknode 1;
	state = -1;
	personality = 49;
	nextstate = 1;
	condition = 1;
	question = "Secretary";
	text1 = "A young women with delicate silk robes is writing something on a pile of papers, while talking with an unhappy peasant. It seems he wants to make an appointment with the Mayor.";

begintalknode 2;
	state = 1;
	personality = 49;
	nextstate = 2;
	condition = 1;
	question = "Sorry to disturb, but we really have to see the Mayor.";
	text1 = "The man looks angry at you. _What! I was here first!_ The woman calms him down. _What is so important that you want to go in first?_";

begintalknode 3;
	state = 2;
	personality = 49;
	nextstate = 3;
	condition = 1;
	question = "Its about the Senarti";
	text1 = "She looks surprised. _The Senarti, eh? Okay, you have convinced me. I understand you would like an appointment with the Mayor then?_";

begintalknode 4;
	state = 3;
	personality = 49;
	nextstate = -1;
	condition = 1;
	question = "Yes please";
	text1 = "She checks the book of appointments. _It seems you don't have an appointment yet. okay, the mayor will see you tomorrow._ She closes the book. _That's settled then, good bye!_";
	text2 = "She checks the book of appointments. _Ah, I see you already have made an appointment. come back when you have it._ She says good bye and returns to the angry man.";
	text3 = "She checks the book of appointments. _I see you had an appointment, but didn't come to it on time. You'll have to make a new one._ She crosses the old appointment out.";
	code =
		if (get_flag(28,0) == 0) {
				remove_string(2);
				remove_string(3);
				set_flag(28,0,1);
				print_str_color("You made an appointment to see mayor Arbuckle of",3);
				print_str_color("		Filberton for tomorrow.",3);
				
				day1 = what_day_of_scenario();
				set_flag(250,4,day1);
				
				set_flag(200,2,0);
				end();
				}
				
		if (get_flag(28,0) == 1) {
				remove_string(1);
				remove_string(3);
				end();
				}
		
		if (get_flag(28,0) == 2) {
				remove_string(1);
				remove_string(2);
				print_str_color("Your appointment with mayor Arbuckle was cancelled.",3);
				set_flag(28,0,0);
				set_flag(200,2,0);
				end();
				}
	break;

begintalknode 5;
	state = 1;
	personality = 48;
	nextstate = -1;
	condition = 1;
	question = "Hey, do you have an affair with the Mayor? You're the secretary, right?";
	text1 = "She looks at you with bewilderment. _What!? Go away!_ The man she was talking to also seems angry. _She was talking to me! Now go away!_";
	action = END_TALK;

// *** Mayor Arbuckle ***

begintalknode 6;
	state = -1;
	personality = 48;
	nextstate = 4;
	condition = 1;
	question = "Mayor Arbuckle";
	text1 = "This small man with nice robes looks quite worried. He sees you and wants to make himself as small as possible, so you wouldn't see him. Is this the mayor of the town that has one of the most important magic schools of the Empire?";
	text2 = "Mayor Arbuckle's serious face vanishes and is replaced with a warm smile. He looks at you. _What can I do for you?_";
	text3 = "When you enter mayor Arbuckle's room, the mayor stand up and greets you. News travels quickly in this province. He must have heard of you killing Thralni.";
	code =
		if (get_flag(28,2) == 0) {
				add_string(1);
				remove_string(2);
				remove_string(3);
				}
		
		if (get_flag(28,2) != 0) {
				remove_string(1);
				add_string(2);
				remove_string(3);
				}
		
		if (get_flag(5,1) == 2) {
				remove_string(1);
				remove_string(2);
				add_string(3);
				}
	break;

begintalknode 7;
	state = 4;
	personality = 48;
	nextstate = 5;
	condition = get_flag(28,0) == 0 && get_flag(28,1) == 0;
	question = "Hello good man, can you help us with something?";
	text1 = "He looks frightened. _What? Oh... um... go to my secretary and make an appointment!_ It doesn't look like he wants to talk to you.";

begintalknode 8;
	state = 5;
	personality = 48;
	nextstate = -1;
	condition = 1;
	question = "An appointment? Why should we?";
	text1 = "Now that you said you actually rather not make an appointment, he is even more frightened. _Go away! Go away! Please! I have enough problems already!_ You decide to go and make an appointment.";
	action = END_TALK;

begintalknode 9;
	state = 4;
	personality = 48;
	nextstate = -1;
	condition = get_flag(28,0) == 1 && get_flag(200,2) == 0;
	question = "We have an appointment. Can we speak with you now?";
	text1 = "He looks at his diary. _Nope, not for today. Go away and leave me alone._ He slams his diary shut and looks at his papers again.";
	action = END_TALK;

begintalknode 10;
	state = 4;
	personality = 48;
	nextstate = 6;
	condition = get_flag(28,0) == 1 && get_flag(200,2) == 1;
	question = "Okay, we have an appointment for today.";
	text1 = "He checks his diary. His face looks worried. _Yes. You're right. So what do you want?_";
	code =
		set_flag(200,2,0);
		set_flag(28,0,0);
	break;

begintalknode 11;
	state = 6;
	personality = 48;
	nextstate = 7;
	condition = 1;
	question = "Its about the Senarti. Could you tell us more about them?";
	text1 = "His face turns serious. He takes a book from out of his desk and opens it. _Ah, the Senarti. I can't tell you how worried I am about them. They already ruined two towns. One of them, Stracton, didn't stand a chance. The other, well..._";
	text2 = "_Stracton didn't have any walls you see, farming village, but Summertown did have walls. If you have been to see it, you'll know the damage the Senarti did. If that's what the Senarti can do to big towns with walls...";
	text3 = "He walks to the window. _You see, Filberton has no walls. If the Senarti can do so much damage to a walled city, then I don't want to know what they can do to a city like Filberton._";
	text4 = "Suddenly he turns around and looks at you. _You know what? Go to Summertown, and then come back to me. First I want you to see what the Senarti have been doing, after that I want to ask you something. Okay?_ You nod.";
	text5 = "He looks at you. _Have you been to Summertown yet?_ You shake your heads. _Then do that first, okay?_ You nod. _Good_";
	code =
		if (get_flag(111,1) == 1) {
				remove_string(1);
				remove_string(2);
				remove_string(3);
				remove_string(4);
				}
		
		if (get_flag(111,1) == 2) {
				remove_string(4);
				remove_string(5);
				}
		
		if (get_flag(111,1) == 0) {
				toggle_quest(14,1);
				remove_string(5);
				}
	break;

begintalknode 12;
	state = 7;
	personality = 48;
	nextstate = 7;
	condition = 1;
	question = "But you have one of the best magery schools here, don't you?";
	text1 = "He nods in irritation. _Yes, magery schools. That's exactly the point. It means that we have about four real mages. The rest are apprentices._";

begintalknode 13;
	state = 7;
	personality = 48;
	nextstate = 8;
	condition = get_flag(111,1) == 2;
	question = "We saw what happened to Summertown. We were shocked.";
	text1 = "_I can imagine. I was shocked too. If you also take into account that Fort Filbert is close to both of the attacked towns, you start wondering about the efficiency of the Empire troops. I already asked for reinforcements._";
	text2 = "He sighs. _I got nothing until now. The Empire is a wreck. That women, Prazac, really can't handle the situation. I hope something will happen soon, but I doubt it._";
	code =
		toggle_quest(14,0);
	break;

begintalknode 14;
	state = 8;
	personality = 48;
	nextstate = 7;
	condition = 1;
	question = "You don't have much trust in the Empire, nor Prazac, do you?";
	text1 = "He looks at you, slightly angry. _No, I don't. What do you expect! That I have the patience to wait for all this paperwork to arrive, while my city is in danger?_";
	text2 = "He sits down angrily. _You know what the main problem is? Nobody actually complains about the Empire and its government, while there is so much to complain about. People, because of what is happening now, forgot what the Empire did._";
	text3 = "_However, and I can tell you, the Empire was just as bad, if not worse. You must remember that at all times, because nobody will tell it to you.";
	text4 = "_Just a few years ago, this city was a mess. Why? the Empire invaded the Thraldom, knowing there was a magery school here. So what did they do? They bombed the city! THAT is why I detest the Empire so much._ The man has a point.";

begintalknode 15;
	state = 8;
	personality = 48;
	nextstate = 9;
	condition = get_flag(28,1) == 0;
	question = "Yes, its strange that, even though Fort Filbert is so close, the Senarti still managed to destroy so much.";
	text1 = "He looks very worried. _So you think so too. Maybe I'm paranoid, but you weren't here when the attacks happened. By the time Fort Filbert reacted, the attacks were almost over. Its as if they let the Senarti do what they want to do._";
	text2 = "He looks at you with big eyes. _You know what this means, don't you? If this is true, the Senarti may be even more clever then we had first thought. We must be careful. Maybe if somebody could investigate what's happening at Fort Filbert..._";
	text3 = "His eyes grow bigger, and he looks at you with hope in his eyes. _Maybe, if you could do that? No, its actually far to dangerous. But if you think you would want to, that would be wonderful._ He seems eager to give you the job.";
	text4 = "_You know, if somebody just goes over to Fort Filbert and checks the room of at least the commanding officers, that would be a great help, you know._ You can see this would be a very important quest, but also a dangerous one._";

begintalknode 16;
	state = 9;
	personality = 48;
	nextstate = 6;
	condition = 1;
	question = "We'll think about it.";
	text1 = "His voice stops shaking and he looks more relieved. _I'm glad that you at least consider it._";
	
begintalknode 17;
	state = 9;
	personality = 48;
	nextstate = 6;
	condition = 1;
	question = "Okay, we'll do it.";
	text1 = "He stands up from his chair and looks amazed at you. _You... You are the bravest adventurers I have seen. If you could do this for me, I will give you an outrageous reward!_ He seems very happy with your decision.";
	code =
		toggle_quest(11,1);
		set_flag(28,1,1);
		end();
	break;

begintalknode 18;
	state = 9;
	personality = 48;
	nextstate = 6;
	condition = 1;
	question = "We're sorry, but no. We will not do it.";
	text1 = "He seems to be depressed. Again. _I can't say how sorry I am to hear that, but I guess you have more important things to do. However, if you would want to do it later, you can always come back._";

begintalknode 19;
	state = 7;
	personality = 48;
	nextstate = -1;
	condition = get_flag(28,1) == 1 && get_flag(12,10) == 1;
	question = "We found something. Its a small note. (Show the note to Mayor Arbuckle)";
	text1 = "You present him with the note. He stands up and claps his hands. _Well done! I'd better get this to the Mayors of Voughton and Pleasantville!_ He claps again, and a sack of gold is brought to you.";
	text2 = "_I hope this will help you on your journey. Because of your actions, less people will be killed._ Smiling, he sits down. _I will send this around to the other mayors of the other towns. Commander Johnson will be in prison in a few days._";
	code =
		toggle_quest(11,0);
		set_flag(28,1,2);
		day2 = what_day_of_scenario();
		set_flag(250,5,day2); // day2 set => day2 + 3 = day commander Johnson is arrested
		change_spec_item(1,-1);
		award_party_xp(100,30);
		change_coins(500);
	break;

begintalknode 20;
	state = 4;
	personality = 48;
	nextstate = 7;
	condition = get_flag(28,1) == 1 && get_flag(28,2) == 0;
	question = "We hope we don't have to make an appointment, or do we?";
	text1 = "He looks amazed at you. _But no! Of course not! You do a quest for me, which means you don't have to make any appointment to see me. So what would you like to know?_";
	code =
		set_flag(28,2,1);
	break;

begintalknode 21;
	state = 4;
	personality = 48;
	nextstate = 7;
	condition = get_flag(28,1) == 2 && get_flag(28,2) == 0;
	question = "We hope we don't have to make an appointment, or do we?";
	text1 = "He looks amazed at you. _But no! Of course not! You helped me in a great way by doing that quest, which means you don't have to make any appointment to see me. So what would you like to know?_";
	code =
		set_flag(28,2,1);
	break;

begintalknode 22;
	state = 4;
	personality = 48;
	nextstate = 7;
	condition = get_flag(28,1) == 1 && get_flag(28,2) == 1;
	question = "Hello again, sorry to disturb you from your work.";
	text1 = "He looks pleased to see you. _No problem at all. What is it you wanted to ask?_";

begintalknode 23;
	state = 4;
	personality = 48;
	nextstate = 7;
	condition = get_flag(28,1) == 2 && get_flag(28,2) == 1;
	question = "Hello again, sorry to disturb you from your work.";
	text1 = "He looks pleased to see you. _No problem at all. What is it you wanted to ask?_";

begintalknode 24;
	state = 7;
	personality = 48;
	nextstate = 10;
	condition = 1;
	question = "How fares Filberton?";
	text1 = "_Could have been better._ He stands up and walks to the window. Then he turns back to you. _If it weren't for the Senarti, all would have been fine._";

begintalknode 25;
	state = 10;
	personality = 48;
	nextstate = 11;
	condition = 1;
	question = "Could you tell us more about your problems with the Senarti?";
	text1 = "_Normal things as all the mayors of all towns in Riverrod have, I suppose._ He sits down again, leans back in his chair and looks at you. He shrugs. _Except for the fact that they scare people away, leaving us with a dying economy, well._";
	text2 = "He takes a paper from out of his desk and shows it to you. _It's a list I made of all problems I have to solve._ The list is quite long. _Get the picture?_";

begintalknode 26;
	state = 11;
	personality = 48;
	nextstate = 7;
	condition = 1;
	question = "That's quite a long list you have there.";
	text1 = "He gives the paper a second look, after which he takes a pencil and adds another issue. _Yes, I know, and it gets longer all the time. Any other thing you wanted to ask?_";

begintalknode 27;
	state = 11;
	personality = 48;
	nextstate = 7;
	condition = 1;
	question = "But how do all these problems come to being then?";
	text1 = "He shrugs. And again. _Multiple reasons, all linked to the Senarti. Most of the problems is because they scare people away or they just burn cities and keep robbing all places._";
	text2 = "You wish you could say something to cheer him up, but you can't. Instead, you look at him with big eyes, waiting for him to tell you more. _I have nothing to tell you anymore. Please go now, would you? I have a splitting headache._ You don't.";

begintalknode 28;
	state = 4;
	personality = 48;
	nextstate = -1;
	condition = get_flag(28,0) == 2;
	question = "We have an appointment. Can we speak with you now?";
	text1 = "He looks at his diary. _I'm sorry, but you missed your appointment with me. Make a new one please._";
	action = END_TALK;

begintalknode 29;
	state = 4;
	personality = 48;
	nextstate = 12;
	condition = get_flag(16,0) == 9;
	question = "Did you already know of the attack on the Empire Headquarters?";
	text1 = "_Yes, I did already know. The situation is growing worse._ He stands up from his table, and slowly walks over to the window, where he keeps standing. _Something must happen, or else entire Riverrod will collapse._";
	text2 = "He gets seated again. _I should actually discuss this with the mayors of Voughton and Pleasantville. However, I have so much to do in my own city, that I just don't have the time._";

// *** Enlil ***

begintalknode 30;
	state = -1;
	personality = 69;
	nextstate = 13;
	condition = 1;
	question = "Enlil";
	text1 = "This wizard is the one that welcomes people and new apprentices to the school. He looks at you, and immediately sees it if one of you is a priest or mage. _Welcome to the Filberton school of magery. What can I do for you?_";
	text2 = "As soon as Enlil sees you, he runs up to you and holds you by your shoulder. He pulls your clothes off, as to see the black spot. _I knew it! Dread curse. I can remove it for you._";
	code =	
		if (get_flag(275,2) == 1) {
				remove_string(1);
				}
		else
			remove_string(2);
	break;	

begintalknode 31;
	state = 13;
	personality = 69;
	nextstate = 14;
	condition = get_flag(275,2) == 1;
	question = "Can you cure the dread curse for me?";
	text1 = "He stares at you in disbelief for asking that. _Sure I can, but it will cost you of course. Do you happen to have 500 coins?_ You take your pouch of coins and show him what you have.";

begintalknode 32;
	state = 14;
	personality = 69;
	nextstate = 13;
	condition = 1;
	question = "Is this enough?";
	text1 = "He counts your coins. _Yes, that is enough._ You keep standing still, while Enlil starts making gestures with his arms and hands. After a few moments, the black spot is gone.";
	text2 = "He counts your coins. _I'm sorry, but this is not enough. Come back later with more, and I'll cure you._";
	code =
		if (coins_amount() >= 500) {
				remove_string(2);
				alter_stat(1000,31,-10);
				change_coins(-500);
				set_flag(275,2,0);
				}
		
		if (coins_amount() < 500) {
				remove_string(1);
				}
	break;

begintalknode 33;
	state = 13;
	personality = 69;
	nextstate = 15;
	condition = 1;
	question = "Are there any spells you can teach me?";
	text1 = "He looks surprised, but also happy. _Me? Of course I can! What would you like to know?_";

begintalknode 34;
	state = 15;
	personality = 69;
	nextstate = 13;
	condition = 1;
	question = "Just spells please.";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Enlil's mage spells","Enlil knows some handy spells.",18,3,-1);
	break;

begintalknode 35;
	state = 15;
	personality = 69;
	nextstate = 13;
	condition = 1;
	question = "Do you happen to know potion recipes?";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Enlil's recipes","Prices are good, and the potion recipes are useful.",19,3,-1);
	break;

begintalknode 36;
	state = 13;
	personality = 69;
	nextstate = 16;
	condition = 1;
	question = "How is it going with this school?";
	text1 = "He frowns. _Despite all the recent troubles (I suggest going to Mayor Arbuckle about these problems), everything goes well. Due to the threats more people than usual want to become mages or priests, so they can defend themselves._";

begintalknode 37;
	state = 16;
	personality = 69;
	nextstate = 16;
	condition = 1;
	question = "Who and where is Mayor Arbuckle?";
	text1 = "This seems to surprise him. _Mayor Arbuckle is the mayor of this town. I'm surprised you didn't hear about him. He is a very good leader. He is at the city hall. I suggest you go speak with him._";

begintalknode 38;
	state = 16;
	personality = 69;
	nextstate = 16;
	condition = 1;
	question = "Oh really? So business is going well then?";
	text1 = "He smiles. _Yes, surprisingly so._ Classrooms are full. We even work at night to fulfil the requests of the apprentices._";

begintalknode 39;
	state = 16;
	personality = 69;
	nextstate = 15;
	condition = 1;
	question = "Do you think we can follow some classes here?";
	text1 = "_I'm sorry, but you can't._ He really seems to be very sorry. _We are full. However, I can teach you some spells or potion recipes, if you wish._";

// *** teachers at school of magery ***

begintalknode 40;
	state = -1;
	personality = 70;
	nextstate = -1;
	condition = 1;
	question = "Teacher";
	text1 = "The teacher is currently explaining all kinds of things. You wouldn't want to break the concentration of all these pupils, would you? Anyway, you leave.";

// *** Apprentices for mage and priest ***

begintalknode 41;
	state = -1;
	personality = 71;
	nextstate = -1;
	condition = 1;
	question = "Apprentice mage";
	text1 = "This apprentice mage is listening carefully to all what the teacher says. It would be better not to disturb him in his concentration.";

begintalknode 42;
	state = -1;
	personality = 72;
	nextstate = -1;
	condition = 1;
	question = "Apprentice priest";
	text1 = "This apprentice priest, wearing lovely robes, is listening to her teacher. It would be better not to disturb her.";

// *** Guards ***

begintalknode 43;
	state = -1;
	personality = 73;
	nextstate = -1;
	condition = 1;
	question = "Guard";
	text1 = "This guard is standing here and looking around, as to make sure no unwanted visitor can come in. You approach him, but you only get stupid nicknames and such thrown at you, so you go away.";

begintalknode 44;
	state = -1;
	personality = 74;
	nextstate = -1;
	condition = 1;
	question = "Guard";
	text1 = "This guard walks around and makes sure nothing bad happens. He has a small yellow star on his armor, so you suppose he is from the local police station.";

// *** Chickens in the temple ***

begintalknode 45;
	state = -1;
	personality = 75;
	nextstate = -1;
	condition = 1;
	question = "Chicken";
	text1 = "This is a chicken. A chicken is a small, often white-feathered bird, that is eaten cooked, grilled and barbecued.";

// *** Mother Della ***

begintalknode 46;
	state = -1;
	personality = 76;
	nextstate = 17;
	condition = 1;
	question = "Mother Della";
	text1 = "This high priest (also literally), is in charge of this temple. You really gotta ask her about these chickens. It seems a bit stupid to have all these chickens running around in your temple.";

begintalknode 47;
	state = 17;
	personality = 76;
	nextstate = 18;
	condition = 1;
	question = "Why are all these chickens here?";
	text1 = "She smiles. You doubt that nobody else has asked this question. _You would think I would grow impatient the more I have to answer this question, but I keep patient enough. Isn't that wonderful?_";

begintalknode 48;
	state = 18;
	personality = 76;
	nextstate = 19;
	condition = 1;
	question = "that's very nice and all, but why are these chicken here?";
	text1 = "_Why?_ she laughs. _Why do you think! This is the temple of the almighty chicken gods! Rulers of everything that is a chicken! This temple has all these chickens to please the gods._";

begintalknode 49;
	state = 19;
	personality = 76;
	nextstate = 19;
	condition = 1;
	question = "Why would you want to honor chickens as your gods?";
	text1 = "Her face gets slightly purple. _What a strange question is that? Chickens are the most adorable little creatures, and they make good food._ After saying that, she starts praying to the chicken gods.";

begintalknode 50;
	state = 19;
	personality = 76;
	nextstate = 19;
	condition = 1;
	question = "So you honor the chicken gods?";
	text1 = "_Yes. The chicken gods are a group of very powerful gods. There are nine chicken gods, and six chick gods. Chick as in _the child of a chicken_ of course._ She giggles.";

begintalknode 51;
	state = 19;
	personality = 76;
	nextstate = 19;
	condition = 1;
	question = "Do many people here believe in the chicken gods?";
	text1 = "She throws her hands in the air and turns around. _Look at this temple! If nobody would care about the chicken gods, would such a large temple be built here, do you think?_";

begintalknode 52;
	state = 17;
	personality = 76;
	nextstate = 20;
	condition = 1;
	question = "Can you teach us anything? Like priest spells?";
	text1 = "_Why yes! I can teach you things for a small fee._ While saying that (you notice she emphasised _fee_) she looks at you with big tinkling eyes. Prices may be high here.";

begintalknode 53;
	state = 20;
	personality = 76;
	nextstate = -1;
	condition = 1;
	question = "I'd like to learn some spells, please.";
	text1 = "You conclude your business";
	code = 
		begin_shop_mode("Mother Della's spells","The price is quite high, but the spells are very good.",20,4,-1);
	break;
	action = END_TALK;

begintalknode 54;
	state = 20;
	personality = 76;
	nextstate = -1;
	condition = 1;
	question = "We changed our minds.";
	text1 = "_That's okay_ (the sparkle in her eyes fades away). _I guess you'll be here long enough to stop by a second time to buy something._ You nod. This makes her a bit happier.";
	action = END_TALK;

// *** Hermaiony ***

begintalknode 55;
	state = -1;
	personality = 77;
	nextstate = 21;
	condition = 1;
	question = "Hermaiony";
	text1 = "This priestess is still an apprentice. She has apprentice robes, although they already signify a higher status then the apprentice robes of real apprentices who just started out.";

begintalknode 56;
	state = 21;
	personality = 77;
	nextstate = 22;
	condition = 1;
	question = "What is your duty in this temple?";
	text1 = "_I help with the sacrificing, clean the place and look after the chickens._";

begintalknode 57;
	state = 22;
	personality = 77;
	nextstate = 23;
	condition = 1;
	question = "What do you do while the high priestess sacrifices?";
	text1 = "_I stand next to her and smile, like this._ She forms an enormous smile, and stands perfectly straight and still. After a few moments, she becomes herself again. _More than that I'm not allowed to do.";

begintalknode 58;
	state = 23;
	personality = 77;
	nextstate = 24;
	condition = 1;
	question = "Not allowed? Why?";
	text1 = "She looks at the high priest. _Mother Della is afraid that if I do something wrong, the chicken gods will be unhappy and banish Filberton to the underworld: the big microwave of Ermarian._";

begintalknode 59;
	state = 24;
	personality = 77;
	nextstate = 22;
	condition = 1;
	question = "The big microwave?";
	text1 = "_Yes, the big microwave._ You know she must feel pathetic for believing in this. _The big microwave, as that is the place where a chicken goes before being served._";

begintalknode 60;
	state = 24;
	personality = 77;
	nextstate = 22;
	condition = 1;
	question = "Why would you do something wrong?";
	text1 = "She twitches a bit. _Ah, you know. Hold the knife the wrong way, cut off a wing by accident, that sort a thing._";

begintalknode 61;
	state = 22;
	personality = 77;
	nextstate = 22;
	condition = 1;
	question = "How do keep the place clean with all these chickens running around?";
	text1 = "She points at two boxes in the corner of the temple. _See the boxes? There is nothing in them, but they sure help to keep the place clean._ She smiles, and is pleased to see you very confused.";

begintalknode 62;
	state = 22;
	personality = 77;
	nextstate = 22;
	condition = 1;
	question = "So how do you look after the chickens?";
	text1 = "A chicken is trying to climb up a pillar while you ask this. Hermaiony quickly pulls the chicken of the pillar, and places it on the ground. She walks back to you. _Well, what you saw now is mainly the thing I have to do._";

// *** Police man at desk ***

begintalknode 63;
	state = -1;
	personality = 78;
	nextstate = 25;
	condition = 1;
	question = "Police agent";
	text1 = "This man is one of the few police agents of Riverrod. It appears only Filberton has a local police. The rest of the cities just have soldiers and normal guards.";

begintalknode 64;
	state = 25;
	personality = 78;
	nextstate = 26;
	condition = 1;
	question = "Excuse us, can we ask a question?";
	text1 = "The man looks up at you and spits on the ground. _Wha de ye want?_";

begintalknode 65;
	state = 26;
	personality = 78;
	nextstate = -1;
	condition = 1;
	question = "Can we have information about this city?";
	text1 = "He makes an irritated gesture. _Go ta the mayor!_ He turns his back on you, as a sign for you to leave.";
	action = END_TALK;

begintalknode 66;
	state = 25;
	personality = 78;
	nextstate = -1;
	condition = 1;
	question = "What are your duties, good man?";
	text1 = "_First, don't call me good man! Second, that's not ya business!_ This man is extremely rude. It would be best to beat him up to show more respect, but that doesn't seem to be the best idea according to the people of Filberton. You leave.";
	action = END_TALK;

// *** man shouting at prisoner ***

begintalknode 67;
	state = -1;
	personality = 79;
	nextstate = -1;
	condition = 1;
	question = "Guard";
	text1 = "You approach this guard, as a sign to talk, but he turns around and shouts at you: _Go away! I already have enough problems with this beggar here!_ You obey to him and go away.";

// *** saleswoman on square ***

begintalknode 68;
	state = -1;
	personality = 80;
	nextstate = 27;
	condition = 1;
	question = "Saleswoman";
	text1 = "This woman is trying to sell all kinds of things. Rubies, crude swords, even scrolls. It doesn't look like she has many customers, though.";

begintalknode 69;
	state = 27;
	personality = 80;
	nextstate = 27;
	condition = 1;
	question = "Hello, my good lady. Can we buy something?";
	text1 = "You conclude you business";
	code =
		begin_shop_mode("Strange stuff","This woman can sell you loads of junk",21,4,3);
	break;

begintalknode 70;
	state = 27;
	personality = 80;
	nextstate = 27;
	condition = 1;
	question = "What are you doing?";
	text1 = "_Trying to sell stuff, can't you see?_ She is already touchy, as almost nobody buys anything. That's a pity, as the woman looks quite nice.";

// *** Bartender ***

begintalknode 71;
	state = -1;
	personality = 81;
	nextstate = 28;
	condition = 1;
	question = "Bartender";
	text1 = "The bartender has a huge smile on his face when he sees more potential customers have entered his inn. It seems business is flourishing.";

begintalknode 72;
	state = 28;
	personality = 81;
	nextstate = 29;
	condition = 1;
	question = "How are you doing?";
	text1 = "His smile has just become bigger by 2 inches. _Very well, my young fellows. Business is booming._ You presume this is because of the amount of travellers, wanting to become mages or priests.";
	text2 = "_Well, could have been better, but as you can see, its not that bad._ You look around and see some customers, arguing about modern day cooking recipes. _Its much better than other towns I have seen._ He smiles.";
	code =
		if (get_flag(200,1) == 0) {
				remove_string(2);
				}
		
		if (get_flag(200,1) == 1) {
				remove_string(1);
				}
	break;

begintalknode 73;
	state = 29;
	personality = 81;
	nextstate = 30;
	condition = 1;
	question = "Isn't that weird? I mean, a war is going on.";
	text1 = "_Yeah, well._ His smile disappears for some seconds, then to return even bigger. _So! Would you like a room? We don't have any food at the moment, but it should come later, I hope._";

begintalknode 74;
	state = 30;
	personality = 81;
	nextstate = -1;
	condition = party_size() >= 4;
	question = "We'll have a room for four or more, please.";
	text1 = "His smile just grew another five inches. It almost takes up his whole face. _Sure! of course! Follow me._ You follow him, and he brings you to your room.";
	text3 = "_I'm sorry, but you don't have enough coins._ This didn't make his smile any smaller, though.";
	text5 = "He stares at you, and then at the horse. _That's all nice and so, but not with a horse, thank you._";
	action = INN 40 13 13;

begintalknode 75;
	state = 30;
	personality = 81;
	nextstate = -1;
	condition = party_size() == 3;
	question = "We'll have a room for three, please.";
	text1 = "His smile just grew another five inches. It almost takes up his whole face. _Sure! of course! Follow me._ you follow him, and he brings you to your room.";
	text3 = "_I'm sorry, but you don't have enough coins._ This didn't make his smile any smaller, though.";
	text5 = "He stares at you, and then at the horse. _That's all nice and so, but not with a horse, thank you._";
	action = INN 30 12 20;

begintalknode 76;
	state = 30;
	personality = 81;
	nextstate = -1;
	condition = party_size() == 2;
	question = "We'll have a room for two, please.";
	text1 = "His smile just grew another five inches. It almost takes up his whole face. _Sure! of course! Follow me._ You follow him, and he brings you to your room.";
	text3 = "_I'm sorry, but you don't have enough coins._ This didn't make his smile any smaller, though.";
	text5 = "He stares at you, and then at the horse. _That's all nice and so, but not with a horse, thank you._";
	action = INN 20 17 14;

begintalknode 77;
	state = 30;
	personality = 81;
	nextstate = -1;
	condition = party_size() == 1;
	question = "I'll have a room for one, please.";
	text1 = "His smile just grew another five inches. It almost takes up his whole face. _Sure! of course! Follow me._ You follow him, and he brings you to your room.";
	text3 = "_I'm sorry, but you don't have enough coins._ This didn't make his smile any smaller, though.";
	text5 = "He stares at you, and then at the horse. _That's all nice and so, but not with a horse, thank you._";
	action = INN 10 17 17;

// *** Salesman of armor and weapons at bazar ***

begintalknode 78;
	state = -1;
	personality = 82;
	nextstate = 31;
	condition = 1;
	question = "Salesman";
	text1 = "This man has his own little stall on the small Filberton bazaar. Weapons, bows, arrows and armor are spread all over the tables, which form his stall.";

begintalknode 79;
	state = 31;
	personality = 82;
	nextstate = -1;
	condition = 1;
	question = "Could we buy some armor, please?";
	text1 = "You conclude your business";
	code =
		begin_shop_mode("Armor shop","The armor is of good quality, but it is all a bit old.",22,3,2);
	break;

begintalknode 80;
	state = 31;
	personality = 82;
	nextstate = -1;
	condition = 1;
	question = "Do you have any weapons or archery for sale?";
	text1 = "You conclude your business";
	code =
		begin_shop_mode("Weapons and archery","The weapons are of good quality, but it is all a bit old.",23,3,2);
	break;

// *** Salesman of Stuff ***

begintalknode 81;
	state = -1;
	personality = 83;
	nextstate = 32;
	condition = 1;
	question = "Salesman";
	text1 = "The man behind this stall is quite depressed. You look at his table, and it is filled to the top with arrows and stuff. It is clear almost nobody buys anything.";

begintalknode 82;
	state = 32;
	personality = 83;
	nextstate = -1;
	condition = 1;
	question = "Can we buy stuff?";
	text1 = "You conclude your business";
	code =
		begin_shop_mode("Useless stuff","The stall is filled to the top. Nobody buys anything here, and that is understandable, looking at the prices.",25,5,2);
	break;

begintalknode 83;
	state = 32;
	personality = 83;
	nextstate = 33;
	condition = 1;
	question = "How is business?";
	text1 = "The man isn't pleased with that question. He looks at you and says: _How does it look! My stall is filled to the top! Nobody buys anything!_";

begintalknode 84;
	state = 33;
	personality = 83;
	nextstate = 33;
	condition = 1;
	question = "Just a thought, but maybe you shouldn't look so depressed.";
	text1 = "_What!?_ The man is getting angrier by the minute. _How am I supposed to look happy when business is going down like a giant trying to swim!?_";

begintalknode 85;
	state = 33;
	personality = 83;
	nextstate = 33;
	condition = 1;
	question = "Maybe you should lower your prices.";
	text1 = "_Lower my prices! I would if I could, but I can't._ The man checks his pricelist a second time. _The prices are kind of high, indeed. But I can't do anything about it. Are you going to buy something, or just keep talking?_";

// *** Saleswoman of poleweapons ***

begintalknode 86;
	state = -1;
	personality = 84;
	nextstate = 34;
	condition = 1;
	question = "Saleswoman";
	text1 = "This woman is quite pleased with herself. She looks around, and when she sees her unfortunate neighbor, the one selling all kinds of stuff, she grins evilly.";

begintalknode 87;
	state = 34;
	personality = 84;
	nextstate = 35;
	condition = 1;
	question = "Why are you so pleased?";
	text1 = "She notices you now and grins. _See that man there? the one selling gauntlets and lockpicks and that sort 'a stuff? We are enemies. I'm especially pleased that he doesn't sell anything, while my shop is almost empty._ She grins.";

begintalknode 88;
	state = 35;
	personality = 84;
	nextstate = 34;
	condition = 1;
	question = "That doesn't sound very nice.";
	text1 = "Again she grins. _But of course! I'm a very unfriendly person! But anyway, would you want to buy something? My pole weapons are the finest weapons of Riverrod._";

begintalknode 89;
	state = 34;
	personality = 84;
	nextstate = -1;
	condition = 1;
	question = "We'd like to buy some weapons.";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Pole weapons shop","This shop specialises in pole weapons. The prices are good, and the weapons shine in the light.",24,3,-1);
	break;

// *** Saleswoman of potions and stuff ***

begintalknode 90;
	state = -1;
	personality = 85;
	nextstate = 36;
	condition = 1;
	question = "Saleswoman";
	text1 = "The stall here is filled with nice little things, clothing and herbs. The saleswoman looks like a friendly, helpful person.";

begintalknode 91;
	state = 36;
	personality = 85;
	nextstate = -1;
	condition = 1;
	question = "Good day, may we see your wares?";
	text1 = "You pocket your new possessions and leave.";
	code =
		begin_shop_mode("Stuff, things, and my husband","A rather large stall, selling all things you can imagine.",25,4,2);
	break;

begintalknode 92;
	state = 36;
	personality = 85;
	nextstate = 36;
	condition = 1;
	question = "These are interesting wares.";
	text1 = "She smiles. _Oh, thanks. I did my best to collect them, and now I sell them. They aren't expensive, so... want to buy something?_ She keep smiling with an unconfident smile.";

// *** man in house ***

begintalknode 93;
	state = -1;
	personality = 86;
	nextstate = 37;
	condition = 1;
	question = "Redrick";
	text1 = "The man sits in his chair and eats his fish, but jumps up and draws a sword when you come walking straight into his private house. _Who the hell are you!_";
	text5 = "Redrick now keeps sitting, and waits for you to say something. He stays on guard, though.";
	action = INTRO;

begintalknode 94;
	state = 37;
	personality = 86;
	nextstate = 38;
	condition = get_flag(28,7) == 0;
	question = "Can we help you with something?";
	text1 = "_Well, as a matter of fact..._ He thinks. _You know, if you do a certain thing for me, I might give you a very useful present as a reward._";

begintalknode 95;
	state = 38;
	personality = 86;
	nextstate = 38;
	condition = 1;
	question = "What is this reward you speak of?";
	text1 = "He smiles. _No no no no. First do the quest, then get the reward, not the other way around._";

begintalknode 96;
	state = 38;
	personality = 86;
	nextstate = -1;
	condition = 1;
	question = "So what do you want me to do?";
	text1 = "He walks to the closet, and takes a small map out of it. _Here. Ah yes, go to the Riverrod marshes. Try to find a secluded tunnel. Hydras live there. I want you to go there and bring me three hydra heads._";
	text2 = "_That is your mission. Now go, and may the force of chickens be with you._ He puts the map back and starts eating his chicken-like fish. _Oh yes, be sure to take RED HYDRA heads, and not the blue or green ones._";
	action = END_TALK;
	code =
		set_flag(28,7,1);
		toggle_quest(13,1);
	break;

begintalknode 97;
	state = 37;
	personality = 86;
	nextstate = 37;
	condition = get_flag(28,7) == 1;
	question = "Where did you say the hydras are?";
	text1 = "_Wasn't I clear enough last time?_ He takes the map out of the closet again and shows it to you. _It's here, in the corner of the Riverrod marshes. There's a tunnel. Somewhere there should be the hydras._ He puts the map back in the closet.";

begintalknode 98;
	state = 37;
	personality = 86;
	nextstate = -1;
	condition = get_flag(28,7) == 1 && has_num_of_item(479) >= 3;
	question = "We have the three red hydra heads you asked us to bring you.";
	text1 = "You show him the heads. _Yes, these are indeed the sort I asked you for._ He walks to the closet, takes out the map and tears it apart. he then walks to his bedroom. After a minute he comes back with a golden horn in his hand.";
	text2 = "_This, my friends, is the horn of warriors. With the horn of warriors, you can summon the one that gave you the horn for help. So, if you want me and some friends of mine to help you, just use the horn._";
	text3 = "He gives you the horn, but adds a warning to it. _However, be sure you choose the moment to blow the horn carefully, as you can only use it once. Now go and do your deeds, for me, for Riverrod._";
	text4 = "He takes up his fork, but then calls you back. Again.";
	text5 = "_Just one more very important thing. Be sure to use the horn in a space in which the user of the horn has a space of at least three squares (which can be seen in combat mode). The user must stand in the middle of the path. That is all_";
	code =
		toggle_quest(13,0);
		set_flag(28,7,2);
		char_give_item(0,489);
		take_num_of_item(479,3);
	break;

// *** apprentice priest in main hall ***

begintalknode 99;
	state = -1;
	personality = 72;
	nextstate = -1;
	condition = 1;
	question = "Apprentice priest";
	text1 = "This apprentice priest, wearing lovely robes, is sitting in the main hall, reading a book. You decide not to disturb her.";
